package ch.electronet.wjw.web.taglib;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractUITag;

import com.opensymphony.xwork2.util.ValueStack;

public class FileBrowserTag extends AbstractUITag {

	private static final long serialVersionUID = 1L;

	@Override
	public int doStartTag() throws JspException {
		try {
			pageContext.getOut().append("FileBrowserTag");
		} catch (IOException e) {
			throw new JspException(e);
		}
		return super.doStartTag();
	}

	@Override
	public Component getBean(ValueStack arg0, HttpServletRequest arg1, HttpServletResponse arg2) {

		return null;
	}

	// Attributes
	protected String root;

	public void setRoot(String root) {
		this.root = root;
	}

	protected boolean selectable;

	public void setSelectable(boolean selectable) {
		this.selectable = selectable;
	}

	protected boolean multiple;

	public void setMultiple(boolean multiple) {
		this.multiple = multiple;
	}

	protected String filterPattern;

	public void setFilterPattern(String filterPattern) {
		this.filterPattern = filterPattern;
	}

	protected boolean displayFiles;

	public void setDisplayFiles(boolean displayFiles) {
		this.displayFiles = displayFiles;
	}

	protected String realPath;

	public void setRealPath(String realPath) {
		this.realPath = realPath;
	}

}
